#include "trap.h"    
    .org 0x0
    .text
    .global _start
_start:
    lu12i.w     $a0,-0x7fc00        # a0 = 0x80400000
    addi.w      $a1, $zero, 100     # a1 = 0x00000064
    add.w       $a3, $a0, $a1       # a3 = 0x80400064
    pcaddu12i   $a4, 1000           # a4 = 0x803e800c
    or          $a4, $a4, $a1       # a4 = 0x803e806c
    addi.w      $a1, $zero, -100    # a1 = 0xffffff9c
    ori         $a5, $a1, 100       # a5 = 0xfffffffc
    ori         $a6, $zero, 0xf9c   # a6 = 0x00000f9c
    andi        $a7, $a5, 200       # a7 = 0x000000c8
    andi        $t0, $a5, 0xf38     # t0 = 0x00000f38
    xor         $a0, $a3, $a4       # a0 = 0x007e8008
    sltui       $t1, $a7, 0x0c1     # t1 = 0x00000000
    st.w        $a1, $a3, 0x010
    ld.b        $t2, $a3, 0x010     # t2 = 0xffffff9c
    st.b        $a7, $a3, 0x010     
    ld.w        $t2, $a3, 0x010     # t2 = 0xffffffc8
    addi.w      $t3, $zero, 12      # t3 = 0x0000000c
    srl.w       $t0, $t0, $t3       # t0 = 0x00000000
    xor         $a4, $a0, $a4       # a4 = 0x80400064
    add.w       $t0, $a4, $t2       # t0 = 0x8040002c
    sltui       $t3, $t2, -0x8      # t3 = 0x00000001
    addi.w      $t2, $t2, -0x8      # t2 = 0xffffffc0
    pcaddu12i   $t3, 7              # t3 = 0x80007058
    HIT_GOOD_TRAP